package com.vogue.supplymall.account.domain.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.vogue.supplymall.common.config.CurrencyPropertiesConfig;
/**
 * 获取属性文件里的值
 * @author 崔岳
 *
 */
@Component("propertiesConfig")
public class PropertiesConfig extends CurrencyPropertiesConfig {

    private static final Long DEFAULT_ACTIVATIONCODE_EFFECTIVE_TIME = 900000L;

    private static final Long DEFAULT_SENDMSM_INTERVAL = 50000L;

    /**
     * 手机验证码有效时间（单位毫秒）
     */
    @Value("${activationcode.effective.time}")
    private Long actcodeEffectiveTime = DEFAULT_ACTIVATIONCODE_EFFECTIVE_TIME;

    /**
     * 同一手机发送同一条短信间隔（单位毫秒）
     */
    @Value("${sendmsm.interval}")
    private Long sendmsmInterval = DEFAULT_SENDMSM_INTERVAL;

    /**
     * @return 同一手机发送同一条短信间隔（单位毫秒）
     */
    public Long getActcodeEffectiveTime() {
        return actcodeEffectiveTime;
    }

    /**
     * @return 手机验证码有效时间（单位毫秒）
     */
    public Long getSendmsmInterval() {
        return sendmsmInterval;
    }

}
